
@{
    ViewBag.Title = "美好时光 | 大卫杜夫 | 雪茄";
    var list = ViewBag.list;
    var url = "";
    if (list != null && list.Count > 0)
    {
        var sUrl = list[0].IMG_URL;
        if (!string.IsNullOrEmpty(sUrl))
        {
            url = sUrl;
        }
    }
}
<link href="~/Content/static/css/en.css" rel="stylesheet" />
<div class="top-banner">
    <section class="kv">
        <a href="javascript:void(0)"><div style="background-image:url(@url)">&nbsp;</div></a>
    </section>
</div>
<div id="beautiful-time">
    <section class="masonry-feed">
        <div class="flagged">
            <div class="left">
                @for (int i = 0; i < 3; i++)
            {
                if (i < list.Count)
                {
                    var classitem = "item single";
                    if (i == 0)
                    {
                        classitem = "item third";
                    }
                    <a href="/news/detail/@list[i].NEWS_ID" class="@classitem" style="background-image: url(@list[i].IMG_URL)">
                        <div class="gradient"></div>
                        <div class="hover"></div>
                        <div class="content-wrapper">
                            <h1>@list[i].NEWS_NAME</h1>
                            <h3>@list[i].NEWS_AUTHOR</h3>
                            <div class="teaser">
                                @list[i].NEWS_BRIEF
                            </div>
                        </div>
                        <div class="category">
                            @list[i].NEWS_LABEL
                        </div>
                    </a>
                }
            }
            </div>

            <div class="right">
                @if (list.Count > 3)
            {<a href="/news/detail/@list[3].NEWS_ID" class="item double-height" style="background-image: url(@list[3].IMG_URL)">
                <div class="gradient"></div>
                <div class="hover"></div>
                <div class="content-wrapper">
                    <h1>@list[3].NEWS_NAME</h1>
                    <h3>@list[3].NEWS_AUTHOR</h3>
                    <div class="teaser">
                        @list[3].NEWS_BRIEF
                    </div>
                </div>
                <div class="category">
                    @list[3].NEWS_LABEL
                </div>
            </a>
            }
            </div>

        </div>
        <div class="group">
            @for (int j = 4; j < list.Count; j++)
        {
            var itemClass = "";
            if ((j - 4) % 6 == 0)
            { itemClass = "whole"; }
            if ((j - 4) % 6 == 1 || (j - 4) % 6 == 2)
            {
                itemClass = "single";
            }
            if ((j - 4) % 6 == 3)
            {
                itemClass = "single break";
            }
            if ((j - 4) % 6 == 4)
            {
                itemClass = "half";
            }
            if ((j - 4) % 6 == 5)
            {
                itemClass = "half break";
            }
            var item = list[j];
                <a href="/news/detail/@item.NEWS_ID" class="item @itemClass" style="background-image: url(@item.IMG_URL)">
                    <div class="gradient"></div>
                    <div class="hover"></div>
                    <div class="content-wrapper">
                        <h1>@item.NEWS_NAME</h1>
                        <h3>@item.NEWS_AUTHOR</h3>
                        <div class="teaser">@item.NEWS_BRIEF</div>
                    </div>
                    <div class="category">
                        @item.NEWS_LABEL
                    </div>

                </a>
        }
        </div>
    </section>
</div>
<style>
    html {
        font-size: 14px;
    }
</style>
<script>
    $(function () {
        $('.masonry-feed .content-wrapper').each(function () {
            var teaser = $('.teaser', this)
            $(this).css({
                bottom: -teaser.height() - 8
            })
        })
    })
</script>
@*Html.ActionLink("abcd", "Index", "Home");*@